# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-olefile
_pkgname=olefile
pkgver=0.46
pkgrel=4
pkgdesc='Python package to parse, read and write Microsoft OLE2 files (Structured Storage or Compound Document, Microsoft Office).'
url='https://pypi.org/project/olefile/#files'
arch=('any')
license=('BSD')
depends=('python2')
makedepends=('python2-setuptools')
conflicts=('python2-olefileio')
replaces=('python2-olefileio')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.zip")
sha512sums=('2a19c443c1e4519680027ff557b5f737e6d0e707c1932a759ea85105717f4f6393149e0eb04589fe2b2b7e0c474042cfe34801faad38517799483b711001b4ac')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

